package com.sls.nzdapplication.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.sls.nzdapplication.model.DyEquipment;
import com.sls.nzdapplication.model.DyEquipmentLine;
import com.sls.nzdapplication.model.Equipment;
import com.sls.nzdapplication.model.EquipmentLine;
import com.sls.nzdapplication.model.Gyyhd;
import com.sls.nzdapplication.model.Meter;
import com.sls.nzdapplication.model.MeterBox;
import com.sls.nzdapplication.model.StationArea;
import com.sls.nzdapplication.model.Switch;
import com.sls.nzdapplication.model.SwitchEquipment;
import com.sls.nzdapplication.model.User;
import com.sls.nzdapplication.model.WellSection;
import com.sls.nzdapplication.model.WellSectionHole;
import com.sls.nzdapplication.model.WorkLine;

import com.sls.nzdapplication.db.DyEquipmentDao;
import com.sls.nzdapplication.db.DyEquipmentLineDao;
import com.sls.nzdapplication.db.EquipmentDao;
import com.sls.nzdapplication.db.EquipmentLineDao;
import com.sls.nzdapplication.db.GyyhdDao;
import com.sls.nzdapplication.db.MeterDao;
import com.sls.nzdapplication.db.MeterBoxDao;
import com.sls.nzdapplication.db.StationAreaDao;
import com.sls.nzdapplication.db.SwitchDao;
import com.sls.nzdapplication.db.SwitchEquipmentDao;
import com.sls.nzdapplication.db.UserDao;
import com.sls.nzdapplication.db.WellSectionDao;
import com.sls.nzdapplication.db.WellSectionHoleDao;
import com.sls.nzdapplication.db.WorkLineDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig dyEquipmentDaoConfig;
    private final DaoConfig dyEquipmentLineDaoConfig;
    private final DaoConfig equipmentDaoConfig;
    private final DaoConfig equipmentLineDaoConfig;
    private final DaoConfig gyyhdDaoConfig;
    private final DaoConfig meterDaoConfig;
    private final DaoConfig meterBoxDaoConfig;
    private final DaoConfig stationAreaDaoConfig;
    private final DaoConfig switchDaoConfig;
    private final DaoConfig switchEquipmentDaoConfig;
    private final DaoConfig userDaoConfig;
    private final DaoConfig wellSectionDaoConfig;
    private final DaoConfig wellSectionHoleDaoConfig;
    private final DaoConfig workLineDaoConfig;

    private final DyEquipmentDao dyEquipmentDao;
    private final DyEquipmentLineDao dyEquipmentLineDao;
    private final EquipmentDao equipmentDao;
    private final EquipmentLineDao equipmentLineDao;
    private final GyyhdDao gyyhdDao;
    private final MeterDao meterDao;
    private final MeterBoxDao meterBoxDao;
    private final StationAreaDao stationAreaDao;
    private final SwitchDao switchDao;
    private final SwitchEquipmentDao switchEquipmentDao;
    private final UserDao userDao;
    private final WellSectionDao wellSectionDao;
    private final WellSectionHoleDao wellSectionHoleDao;
    private final WorkLineDao workLineDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        dyEquipmentDaoConfig = daoConfigMap.get(DyEquipmentDao.class).clone();
        dyEquipmentDaoConfig.initIdentityScope(type);

        dyEquipmentLineDaoConfig = daoConfigMap.get(DyEquipmentLineDao.class).clone();
        dyEquipmentLineDaoConfig.initIdentityScope(type);

        equipmentDaoConfig = daoConfigMap.get(EquipmentDao.class).clone();
        equipmentDaoConfig.initIdentityScope(type);

        equipmentLineDaoConfig = daoConfigMap.get(EquipmentLineDao.class).clone();
        equipmentLineDaoConfig.initIdentityScope(type);

        gyyhdDaoConfig = daoConfigMap.get(GyyhdDao.class).clone();
        gyyhdDaoConfig.initIdentityScope(type);

        meterDaoConfig = daoConfigMap.get(MeterDao.class).clone();
        meterDaoConfig.initIdentityScope(type);

        meterBoxDaoConfig = daoConfigMap.get(MeterBoxDao.class).clone();
        meterBoxDaoConfig.initIdentityScope(type);

        stationAreaDaoConfig = daoConfigMap.get(StationAreaDao.class).clone();
        stationAreaDaoConfig.initIdentityScope(type);

        switchDaoConfig = daoConfigMap.get(SwitchDao.class).clone();
        switchDaoConfig.initIdentityScope(type);

        switchEquipmentDaoConfig = daoConfigMap.get(SwitchEquipmentDao.class).clone();
        switchEquipmentDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        wellSectionDaoConfig = daoConfigMap.get(WellSectionDao.class).clone();
        wellSectionDaoConfig.initIdentityScope(type);

        wellSectionHoleDaoConfig = daoConfigMap.get(WellSectionHoleDao.class).clone();
        wellSectionHoleDaoConfig.initIdentityScope(type);

        workLineDaoConfig = daoConfigMap.get(WorkLineDao.class).clone();
        workLineDaoConfig.initIdentityScope(type);

        dyEquipmentDao = new DyEquipmentDao(dyEquipmentDaoConfig, this);
        dyEquipmentLineDao = new DyEquipmentLineDao(dyEquipmentLineDaoConfig, this);
        equipmentDao = new EquipmentDao(equipmentDaoConfig, this);
        equipmentLineDao = new EquipmentLineDao(equipmentLineDaoConfig, this);
        gyyhdDao = new GyyhdDao(gyyhdDaoConfig, this);
        meterDao = new MeterDao(meterDaoConfig, this);
        meterBoxDao = new MeterBoxDao(meterBoxDaoConfig, this);
        stationAreaDao = new StationAreaDao(stationAreaDaoConfig, this);
        switchDao = new SwitchDao(switchDaoConfig, this);
        switchEquipmentDao = new SwitchEquipmentDao(switchEquipmentDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);
        wellSectionDao = new WellSectionDao(wellSectionDaoConfig, this);
        wellSectionHoleDao = new WellSectionHoleDao(wellSectionHoleDaoConfig, this);
        workLineDao = new WorkLineDao(workLineDaoConfig, this);

        registerDao(DyEquipment.class, dyEquipmentDao);
        registerDao(DyEquipmentLine.class, dyEquipmentLineDao);
        registerDao(Equipment.class, equipmentDao);
        registerDao(EquipmentLine.class, equipmentLineDao);
        registerDao(Gyyhd.class, gyyhdDao);
        registerDao(Meter.class, meterDao);
        registerDao(MeterBox.class, meterBoxDao);
        registerDao(StationArea.class, stationAreaDao);
        registerDao(Switch.class, switchDao);
        registerDao(SwitchEquipment.class, switchEquipmentDao);
        registerDao(User.class, userDao);
        registerDao(WellSection.class, wellSectionDao);
        registerDao(WellSectionHole.class, wellSectionHoleDao);
        registerDao(WorkLine.class, workLineDao);
    }
    
    public void clear() {
        dyEquipmentDaoConfig.clearIdentityScope();
        dyEquipmentLineDaoConfig.clearIdentityScope();
        equipmentDaoConfig.clearIdentityScope();
        equipmentLineDaoConfig.clearIdentityScope();
        gyyhdDaoConfig.clearIdentityScope();
        meterDaoConfig.clearIdentityScope();
        meterBoxDaoConfig.clearIdentityScope();
        stationAreaDaoConfig.clearIdentityScope();
        switchDaoConfig.clearIdentityScope();
        switchEquipmentDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
        wellSectionDaoConfig.clearIdentityScope();
        wellSectionHoleDaoConfig.clearIdentityScope();
        workLineDaoConfig.clearIdentityScope();
    }

    public DyEquipmentDao getDyEquipmentDao() {
        return dyEquipmentDao;
    }

    public DyEquipmentLineDao getDyEquipmentLineDao() {
        return dyEquipmentLineDao;
    }

    public EquipmentDao getEquipmentDao() {
        return equipmentDao;
    }

    public EquipmentLineDao getEquipmentLineDao() {
        return equipmentLineDao;
    }

    public GyyhdDao getGyyhdDao() {
        return gyyhdDao;
    }

    public MeterDao getMeterDao() {
        return meterDao;
    }

    public MeterBoxDao getMeterBoxDao() {
        return meterBoxDao;
    }

    public StationAreaDao getStationAreaDao() {
        return stationAreaDao;
    }

    public SwitchDao getSwitchDao() {
        return switchDao;
    }

    public SwitchEquipmentDao getSwitchEquipmentDao() {
        return switchEquipmentDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public WellSectionDao getWellSectionDao() {
        return wellSectionDao;
    }

    public WellSectionHoleDao getWellSectionHoleDao() {
        return wellSectionHoleDao;
    }

    public WorkLineDao getWorkLineDao() {
        return workLineDao;
    }

}
